title = "搜索结果页模板"
url = "/search/:keyword/"
layout = "default"
==
{% set products = catalog.search(this.param.keyword) %}
{% put page_title %}検索結果： {{ this.param.keyword }}{% endput %}
{% put pageurl %}{{ 'catalog/search'|page({keyword: this.param.keyword}) }} - {% endput %}
{% put fb_standard_event %}
fbq('track', 'Search', {
search_string: 'leather sandals'
});
{% endput %}
{% put nextprePageUrl %}
{% if products.nextPageUrl %}
<link rel="next" href="{{ products.nextPageUrl }}">
{% endif %}
{% endput %}
{% put meta_keywords %}{{ this.param.keyword }},{{ category.meta_keywords }}{% endput %}
{% put meta_description %}検索結果：{{ this.param.keyword }}. {{ category.meta_description }}{% endput %}


    <div class="itemList">
        <ul class="listUl">
            {% partial 'catalog/list-products' products = products.data %}

        </ul>
        <div style="overflow: hidden;margin: 5px 0 10px;">
            <p class="allItemNum"> 全{{ products.total }} 商品 </p>
            {{ products.render|raw }}
        </div>

    </div>
</div>

<script type="text/javascript">
    {% if products.data  %}
    {% for key, product in products.data %}
    var google_tag_params = {
        ecomm_prodid: "{{product.id}}",
        ecomm_pagetype: "searchresults",
        ecomm_totalvalue: {{product.price|ratePrice}}
    };
    {% endfor %}
    {% else %}
    var google_tag_params = {
        ecomm_prodid: "",
        ecomm_pagetype: "searchresults",
        ecomm_totalvalue:
    };
    {% endif %}
</script>